package vn.axonactive.vision.service;

import java.util.List;

import vn.axonactive.vision.dao.EmailDao;
import vn.axonactive.vision.dao.impl.EmailDaoImpl;
import vn.axonactive.vision.entity.Email;
import vn.axonactive.vision.service.EmailService;

public class EmailService {
	
	private static EmailDao emailDao;

	public static EmailDao getEmailDao() {
		if(emailDao == null) {
			emailDao = new EmailDaoImpl();
		}
		return emailDao;
	}

	
	public static List<Email> findAllEmailsBelongToUser(String email) {
		return getEmailDao().findAllEmailsBelongToUser(email);
	}
	
	public static List<Email> findDraftEmailsBelongToUser(String email) {
		return getEmailDao().findDraftEmailsBelongToUser(email);
	}

}
